<template>
    <van-nav-bar :left-arrow="arrow" :title="title" :placeholder="fixed ? true : false" left-arrow
        @click-left="onClickLeft" :fixed="fixed" :right-text="rightText" @click-right="emit('onClickRight')" />
</template>

<script setup>

const props = defineProps({
    title: {
        type: String,
        default: '标题'
    },
    fixed: {
        type: Boolean,
        default: true
    },
    rightText: {
        type: String,
        default: '按钮'
    },
    arrow: {
        type: Boolean,
        default: true
    }

})

const emit = defineEmits(['onClickRight'])

// 点击左侧
const onClickLeft = () => {
    uni.navigateBack();
}

</script>

<style lang="scss" scoped>
:deep(.van-icon) {
    color: #111 !important;
}
</style>